﻿var flashObj = null;
var flashCopy = null;
$(function(){
	initFlex();
});

function initFlex(){
	try {
		flashObj = swfobject.getObjectById("imageUpload");
		flashObj.MXMLInitParams({
			url:"/filter/image/imgload",
			jsFunction:"upload",
			filter:"*.jpg;*.png;*.gif",
			method:"post",
			miniMargin:10,
			btnText:"选择图片",
			errFunction:"errFunction",
			maxNums:30
		});
		flashObj.MXMLSetParam("albumsId",albumsId);
		flashObj.MXMLSetParam("userId",userId);
	}catch(e){
		if(!flashObj.MXMLInitParams) {
			window.setTimeout(initFlex,100);
		}
	}
}

function upload(){
	alert("上传完成");
}

function errFunction(err){
	alert(err);
}
